package cc.comac.mom.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.EquipReqularCheckItemService;
import cc.comac.mom.bean.EquipReqularCheckBean;
import cc.comac.mom.bean.EquipReqularCheckItem;
import cc.comac.mom.bean.EquipReqularCheckItemBean;
import cc.comac.mom.util.ResultBean;

@RestController
@RequestMapping(value = "/EquipReqularCheckItem")
public class EquipReqularCheckItemController {

	@Autowired
	private EquipReqularCheckItemService equipReqularCheckItemService;

	@RequestMapping(value = "/saveBatch", method = RequestMethod.POST)
	public ResultBean save(@RequestBody EquipReqularCheckBean obj) {

		ResultBean resultBean = equipReqularCheckItemService.saveBatch(obj);

		return resultBean;
	}

	@RequestMapping(value = "/getById", method = RequestMethod.POST)
	public EquipReqularCheckItem getById(@RequestBody EquipReqularCheckItem obj) {
		return equipReqularCheckItemService.getById(obj);

	}

	@RequestMapping("/deleteBatch")
	public ResultBean deleteBatch(@RequestBody EquipReqularCheckItemBean obj) {
		return equipReqularCheckItemService.deleteBatch(obj);

	}

	@RequestMapping("/moveUp")
	public ResultBean moveUp(@RequestBody EquipReqularCheckItem obj) {
		return equipReqularCheckItemService.moveUp(obj);

	}

	@RequestMapping("/moveDown")
	public ResultBean moveDown(@RequestBody EquipReqularCheckItem obj) {
		return equipReqularCheckItemService.moveDown(obj);

	}

	@RequestMapping("/selectByCondition")
	public EquipReqularCheckItemBean selectByCondition(@RequestBody EquipReqularCheckItem obj) {
		return equipReqularCheckItemService.selectByCondition(obj);

	}
}
